


import { lazy } from "react";
import { Navigate } from "react-router-dom";
import Index from "./home/index"
// import AddCommodity from "./commodity/orderinquiry";
// import CommodityList from "./commodity/commodityList"
// import OrderForm from "./orderform/orderform"
// import Home from "./index"
const Home = lazy(()=>import("./index"))
const AddCommodity = lazy(()=>import("./commodity/orderinquiry"))
const CommodityList = lazy(()=>import("./commodity/commodityList"))
const OrderForm = lazy(()=>import("./orderform/orderform"))
const Information = lazy(()=>import("./information/index"))
//懒加载


export default [
    {
        path:"/home",
        element:<Home/>,
        children:[
            {
                path:"/home",
                element:<Navigate replace to="/home/index"/>
            },
            {
                path:"/home/index",
                element:<Index/>
            },
            {
                path:"/home/AddCommodity",
                element:<AddCommodity/>
            },
            {
                path:"/home/CommodityList",
                element:<CommodityList/>
            },
            {
                path:"/home/OrderForm",
                element:<OrderForm/>
            },
            {
                path:"/home/information",
                element:<Information/>
            }
        ]
    }
    
    
]